package com.iss.okair.db.mapper;

import com.iss.okair.db.entity.Employee;
import com.iss.okair.db.entity.EmployeeDept;
import com.iss.okair.db.mapper.sql.EmployeeSQL;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

public interface EmployeeMapper {
    @Select("SELECT distinct dept FROM `employee`")
    //得到一个员工部门全部查询集合
    List<EmployeeDept> getempdeptlist();
    //条件查询语句
    @SelectProvider(type= EmployeeSQL.class,method = "findEmployee")
   List<Employee> selectBy(Employee emp);
    //CONCAT(empNo,' ',nameCn)
    @Select("select empNo,nameCn from employee ")
    List<Employee>selectList();

}
